package mysql

import "gorm.io/gorm"

type Order struct {
	gorm.Model
	UserId string  `gorm:"type:int(10);not null;comment:用户Id;"`
	GoodId float64 `gorm:"type:int(10);not null;comment:商品Id;"`
	Num    int     `gorm:"type:int(11);not null;comment:数量;"`
}

func (c *Order) OrderInsert() error {
	return Db.Create(&c).Error
}
